package com.surenpi.jenkins.client.computer;

import com.surenpi.jenkins.client.BaseModel;
import com.surenpi.jenkins.client.core.HourMinSec10;

public class LoadStatistics extends BaseModel {
   private HourMinSec10 busyExecutors;
   private HourMinSec10 queueLength;
   private HourMinSec10 totalExecutors;

   public HourMinSec10 getBusyExecutors() {
      return this.busyExecutors;
   }

   public void setBusyExecutors(HourMinSec10 busyExecutors) {
      this.busyExecutors = busyExecutors;
   }

   public HourMinSec10 getQueueLength() {
      return this.queueLength;
   }

   public void setQueueLength(HourMinSec10 queueLength) {
      this.queueLength = queueLength;
   }

   public HourMinSec10 getTotalExecutors() {
      return this.totalExecutors;
   }

   public void setTotalExecutors(HourMinSec10 totalExecutors) {
      this.totalExecutors = totalExecutors;
   }

   public int hashCode() {
      int prime = 31;
      int result = 1;
      result = 31 * result + (this.busyExecutors == null ? 0 : this.busyExecutors.hashCode());
      result = 31 * result + (this.queueLength == null ? 0 : this.queueLength.hashCode());
      result = 31 * result + (this.totalExecutors == null ? 0 : this.totalExecutors.hashCode());
      return result;
   }

   public boolean equals(Object obj) {
      if (this == obj) {
         return true;
      } else if (obj == null) {
         return false;
      } else if (this.getClass() != obj.getClass()) {
         return false;
      } else {
         LoadStatistics other = (LoadStatistics)obj;
         if (this.busyExecutors == null) {
            if (other.busyExecutors != null) {
               return false;
            }
         } else if (!this.busyExecutors.equals(other.busyExecutors)) {
            return false;
         }

         if (this.queueLength == null) {
            if (other.queueLength != null) {
               return false;
            }
         } else if (!this.queueLength.equals(other.queueLength)) {
            return false;
         }

         if (this.totalExecutors == null) {
            if (other.totalExecutors != null) {
               return false;
            }
         } else if (!this.totalExecutors.equals(other.totalExecutors)) {
            return false;
         }

         return true;
      }
   }
}
